<div class="contents">
  <ol class="breadcrumb">
    <li><a href="#/index/panel">首页</a></li>
    <li><a href="#/roadVideo/list">路演视频列表页</a></li>
    <li class="active">{{id ? "编辑" : "新增"}}</li>
  </ol>

  <form class="form-horizontal" role="form" name="form" ng-submit="save()" novalitext>

    <div class="form-group" ng-class="{'has-error':form.title.$invalid}">
      <label class="col-sm-2 control-label">
        <span class="required">*</span>
        视频名称
      </label>
      <div class="col-sm-5">
        <input type="text" class="form-control" name="title" ng-model="item.title" required="required" placeholder="最多输入20字">
      </div>
    </div>

    <div class="form-group" ng-class="{'has-error':form.videoId.$invalid}">
      <label class="col-sm-2 control-label">
        <span class="required">*</span>
        优酷视频ID
      </label>
      <div class="col-sm-5">
        <input type="text" class="form-control" name="videoId" ng-model="item.videoId" required="required" placeholder="优酷视频ID">
        <a href="javascript:;" ng-click="playVideo(item.videoId)">查看视频</a>
      </div>
    </div>

    <div class="form-group" ng-class="{'has-error':form.isEncryption.$invalid}">
    	<label for="advertSortInput" class="col-sm-2 control-label">
		  <span class="required">*</span>
    	  是否加密
    	</label>
    	<div class="col-sm-5">
    		<label class="radio-inline">
    			<input type="radio" name="isEncryption" value="1" ng-model="item.isEncryption">是</label>
    		<label class="radio-inline">
    			<input type="radio" name="isEncryption" value="0" ng-model="item.isEncryption">否</label>
    	</div>
    </div>

    <div class="form-group" ng-class="{'has-error':form.lecturerName.$invalid}">
      <label class="col-sm-2 control-label">
        讲师姓名
      </label>
      <div class="col-sm-5">
        <input type="text" class="form-control" autocomplete="off" value="" name="lecturerName" ng-model="item.lecturerName" placeholder="讲师姓名">
      </div>
    </div>

    <div class="form-group" ng-class="{'has-error':form.lecturerJob.$invalid}">
      <label class="col-sm-2 control-label">
        讲师职务
      </label>
      <div class="col-sm-5">
        <input type="text" class="form-control" autocomplete="off" value="" name="lecturerJob" ng-model="item.lecturerJob" placeholder="讲师职务">
      </div>
    </div>

    <div class="form-group" ng-class="{'has-error':form.lecturerCompany.$invalid}">
      <label class="col-sm-2 control-label">
        讲师公司
      </label>
      <div class="col-sm-5">
        <input type="text" class="form-control" autocomplete="off" value="" name="lecturerCompany" ng-model="item.lecturerCompany" placeholder="讲师公司">
      </div>
    </div>
		
		<div class="form-group">
      <label class="col-sm-2 control-label">
        产品类型
      </label>
      <div class="col-sm-5">
      	<select type="text" class="form-control" ng-options="m.value as m.text for m in productTypeModel" name="productType" ng-model="item.productType" placeholder="产品名称">
      		<option value="">--选择产品类型--</option>
      	</select>
      </div>
    </div>
		
    <div class="form-group">
      <label class="col-sm-2 control-label">
        产品名称
      </label>
      <div class="col-sm-5">
      	<select class="form-control" ng-if="item.productType != '01'" ng-options="p.id as p.pName for p in productList" name="productId" ng-model="item.productId" placeholder="产品名称">
      		<option value="">--选择产品名称--</option>
      	</select>
      	<select class="form-control" ng-if="item.productType == '01'" ng-options="p.id as p.jjmc for p in productList" name="productId" ng-model="item.productId" placeholder="产品名称">
      		<option value="">--选择产品名称--</option>
      	</select>
        <p style="color: #999">注：没有选择产品的视频不会上架到前台展示</p>
      </div>
    </div>

    <div class="form-group" ng-class="{'has-error':form.content.$invalid}">
      <label class="col-sm-2 control-label">
        视频简介
      </label>
      <div class="col-sm-5">
        <!--<input type="text" class="form-control" autocomplete="off" value="" name="content"  >-->
        <div class="ueditor" config="config" ready="ready" ng-model="item.content" style="height:300px;" placeholder="视频内容" ></div>
      </div>
    </div>

    <div class="form-group" ng-class="{'has-error':form.imagePath.$invalid}">
      <label class="col-sm-2 control-label">
        <span class="required">*</span>
        视频列表视频图片 <small>320*180</small>
      </label>
      <div class="col-sm-5">
        <input type="text" class="form-control" autocomplete="off" value="" name="imagePath" ng-model="item.imagePath" required="required" placeholder="视频列表视频图片">
        <img ng-src="{{item.imagePath}}" style="display:block">
        <div class="btn btn-primary add-pic-btn">上传图片</div>
      </div>
    </div>

    <div class="form-group" ng-class="{'has-error':form.imagePathForProduct.$invalid}">
      <label class="col-sm-2 control-label">
        <span class="required">*</span>
        产品列表视频图片 <small>180*180</small>
      </label>
      <div class="col-sm-5">
        <input type="text" class="form-control" autocomplete="off" value="" name="imagePathForProduct" ng-model="item.imagePathForProduct" required="required" placeholder="产品列表视频图片">
        <img ng-src="{{item.imagePathForProduct}}" style="display:block">
        <div class="btn btn-primary add-pic-btn">上传图片</div>
      </div>
    </div>

    <div class="form-group">
      <label class="col-sm-2 control-label">
        分享标题
      </label>
      <div class="col-sm-5">
        <input type="text" class="form-control" autocomplete="off" value="" name="shareTitle" ng-model="item.shareTitle"  placeholder="分享标题">
      </div>
    </div>

    <div class="form-group">
      <label class="col-sm-2 control-label">
        分享描述文案
      </label>
      <div class="col-sm-5">
        <input type="text" class="form-control" autocomplete="off" value="" name="shareContent" ng-model="item.shareContent" placeholder="分享描述文案">
      </div>
    </div>

		<div class="form-group">
			<label class="col-sm-2 control-label">分享图片地址</label>
			<div class="col-sm-5">
				<input type="text" class="form-control" autocomplete="off" value="" name="shareImage" ng-model="item.shareImage" placeholder="分享图片地址">
				<img ng-src="{{item.shareImage}}" style="display: block;">
				<div class="btn btn-primary add-pic-btn">上传图片</div>		
			</div>
		</div>

    <div class="form-group">
      <label class="col-sm-2 control-label">视频浏览量</label>
      <div class="col-sm-5">
        <input type="number" class="form-control" autocomplete="off" value="" name="browseVolume" ng-model="item.browseVolume" placeholder="视频浏览量">
      </div>
    </div>
    
    <div class="form-group">
      <div class="col-sm-offset-2 col-sm-5">
        <button type="submit" class="btn btn-default">提交</button>
      </div>
    </div>

  </form>
</div>
<div class="layer-box" ng-show="loading">
  <div class="layer-bg" style="z-index: 1000"></div>
  <div class="layer-con " style="padding:10px 20px;background: none; color: #fff; font-size: 28px;z-index: 1001">
    LOADING...
  </div>
</div>
<div class="layer-box" ng-show="showPlayBox">
  <div class="layer-bg" ng-click="stopPlay()" style="z-index: 1000"></div>
  <div class="layer-con " style="padding:10px 20px;background: none; color: #fff; font-size: 28px;z-index: 1001">
    <div id="youkuplayer" style="width:480px;height:400px;background-color: #fff"></div>
  </div>
</div>
<div load-script src="'/static/jquery.jUploader-1.01.js?7'" call-back="" charset="utf-8" ></div>
